package Test_week_04;

import java.util.Arrays;
import java.util.Scanner;

public class ScSort {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] nums = new int[5];
        for(int i=0;i<5;i++){
            System.out.println("请输入第"+(i+1)+"个数字");
            nums[i] = sc.nextInt();
        }
        for(int i=0;i<nums.length;i++){
            for(int j=0;j<nums.length-1;j++){
                int m = 0;
                if(nums[j]<nums[j+1]){
                    m = nums[j];
                    nums[j] = nums[j+1];
                    nums[j+1] = m;
                }
            }
        }
        System.out.println("排序完毕"+ Arrays.toString(nums));
    }
}
